import CanvasAbstract from './CanvasAbstract'
import BossModel from '../model/boss'
import config from '../config'
class Boss extends CanvasAbstract implements ICanvas {
  num(): number {
    return 0
  }
  model(): ModelConstruct {
    return BossModel
  }
  rander(): void {
    this.createModels()
    this.renderModel()
  }
  createModels(): void {
    ;[{ x: config.canvas.width / 2, y: config.canvas.height - config.model.height }].forEach(position => {
      const model = this.model() as ModelConstruct
      const instance = new model(position.x, position.y)
      this.models.push(instance)
    })
  }
}

export default new Boss('boss')
